package com.example.david;

import android.annotation.TargetApi;
import android.app.Activity;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.view.Menu;
import android.widget.GridView;

@TargetApi(Build.VERSION_CODES.HONEYCOMB)
public class Detalhes extends Activity {
	
	String nomeEmpresa;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.grid_layout);
		
		//Capturo o nome da Empresa
		Intent intent = getIntent();
		nomeEmpresa = intent.getStringExtra(Principal.EXTRA_MESSAGE);
		
		System.out.println("Carregando detalhes para " + nomeEmpresa);
		
		GridView gridview = (GridView) findViewById(R.id.grid_view);
		ImageAdapter im = new ImageAdapter(this);
	    gridview.setAdapter(im);
		
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.detalhes, menu);
		return true;
	}
	
	public Usuario getUsuario(){
		return Principal.principal_usuario;
		
	}
	public String getNomeEmpresa(){
		return nomeEmpresa;
	}
	


}
